import request from '@/utils/request'

// 查询分摊规则列表
export function listFundShareRules(query) {
  return request({
    url: '/rules/fundShareRules/list',
    method: 'get',
    params: query
  })
}

// 查询分摊规则详细
export function getFundShareRules(id) {
  return request({
    url: '/rules/fundShareRules/' + id,
    method: 'get'
  })
}

// 查询分摊规则详细
export function getFundShareRulesByFundId(fundId) {
  return request({
    url: '/rules/fundShareRules/fundId/' + fundId,
    method: 'get'
  })
}

// 保存分摊规则
export function saveFundShareRules(data) {
  return request({
    url: '/rules/fundShareRules/save',
    method: 'post',
    data: data
  })
}

// 删除分摊规则
export function delFundShareRules(id) {
  return request({
    url: '/rules/fundShareRules/' + id,
    method: 'delete'
  })
}

// 导出分摊规则
export function exportFundShareRules(query) {
  return request({
    url: '/rules/fundShareRules/export',
    method: 'get',
    params: query
  })
}
